#If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH

# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
################################################################
# Program :
#	This program is used to register the licenses and paths 
# History:
#	2017/08/08	QiuChao First Release
################################################################
#### ==== Licenses and PATH register Begin
#### Export SoftWare Home
##export QUESTA_HOME=/opt/tool/mentor/questasim10_2b/questasim
#export VERDI_HOME=/opt/tool/novas/verdi3_201403
export QUESTA_HOME=/opt/tool/mentor/questasim10_4c/questasim
export VERDI_HOME=/opt/tool/synopsys/verdi_vL_2016_06_1
export VCS_HOME=/opt/tool/synopsys/vcs_mx_vl201606
export VCS_ARCH_OVERRIDE=linux
export ARM_DS5_HOME=/opt/tool/arm/ds5v14build1702
##export A7_HOME=/home/cqiu/work/prj/sim_prj/a7/cortexa7
##export A7_TOOL=${A7_HOME}/logical/cortexa7_intkit/validation/tools
export RISCV_HOME=/opt/tool/riscv

#export VIVADO_HOME=/opt/tool/xilinx/vivado2018_03/Vivado/2018.3
#export VIVADO_HLS_HOME=/opt/tool/xilinx/vivado2018_03/Vivado/2018.3

export SCRIPT_HOME=/home/cqiu/work/tool/stool/linux/scriptTool
export LICENSE_HOME=/home/cqiu/work/tool/stool/linux/all_license_file_lenovo
export SCL_HOME=/opt/tool/synopsys/scl11_9
#export XILINX_UBOOT_HOME=/home/cqiu/code/xilinx/uboot
export VSCODE_HOME=/home/cqiu/.local/share/umake/ide/visual-studio-code
#export JAVA_HOME=/opt/tool/java/jdk1.8.0_112
#export JRE_HOME=${JAVA_HOME}/jre
#export JAVA_BIN=${JAVA_HOME}/bin
#export CLASSPATH=.:${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar:${JRE_HOME}/lib
#export PYTHONPATH=/usr/local:$PYTHONPATH
#export PYTHONPATH=$PYTHONPATH:/home/cqiu/eclipse_workspace/caffe2/build
#export COCOAPI=/home/cqiu/eclipse_workspace/cocoapi
#export DETECTRON=/home/cqiu/eclipse_workspace/detectron
##vscode cmd -- code
#### Export LICENSE FILE 
##export MSIM_LICFILE=simLenvolicense1C-39-47-28-CD-36.dat
export MSIM_LICFILE=simLenvolicense00-19-B9-E0-64-2C.dat
#export VERDI_LICFILE=synopsysLenovo1c394728cd36.dat
#export VCS_LICFILE=synopsysLenovo1c394728cd36.dat
export VCS_LICFILE=synopsysJeejio0019B9E0642C.dat
export ARM_DS5_LIEFILE=armDs5License.dat
export GCC_EMBEED_HOME=/home/cqiu/work/tool/stool/linux/edaTool/gccTool/arm2014_05/arm-2014.05
export NANO_PI_HOME=/home/cqiu/work/tool/stool/linux/edaTool/nanoPiTool/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu
#export VIVADO_LICFILE=vivadohls.lic
#### Export PATH 
export PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:\
${QUESTA_HOME}/linux_x86_64:\
${VERDI_HOME}/bin:\
${VERDI_HOME}/platform/LINUX/bin:\
${VCS_HOME}/gui/dve/bin:\
${VCS_HOME}/bin:\
${ARM_DS5_HOME}/bin:\
${GCC_EMBEED_HOME}/bin:\
${NANO_PI_HOME}/bin:\
#${VIVADO_HOME}/bin:\
#${VIVADO_HLS_HOME}/bin:\
#${A7_TOOL}:\
${VSCODE_HOME}:\
${SCL_HOME}/amd64/bin:\
${RISCV_HOME}/riscv32/bin:\
${SCRIPT_HOME}

#echo $PYTHONPATH
#echo $LD_LIBRARY_PATH
# export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
#### Export LD_LIBRARY_PATH using by vsim and verdi 
####export LD_LIBRARY_PATH=${VERDI_HOME}/share/PLI/MODELSIM/LINUXAMD64
export LD_LIBRARY_PATH=${VERDI_HOME}/share/PLI/VCS/LINUXAMD64
export LD_LIBRARY_PATH=/usr/local/lib:libpli:${LD_LIBRARY_PATH}
#export LM_LICENSE_FILE=:${LICENSE_HOME}/novas_license/${VERDI_LICFILE}
#export LM_LICENSE_FILE=27000@cqiuLenovo:${LICENSE_HOME}/questasim_license/${MSIM_LICFILE}
export LM_LICENSE_FILE=${LICENSE_HOME}/questasim_license/${MSIM_LICFILE}:27000@cqiuLenovo

#export LM_LICENSE_FILE=${LM_LICENSE_FILE}:37000@cqiuLenovo

#${LICENSE_HOME}/arm_license/${ARM_DS5_LIEFILE}

#export ARMLMD_LICENSE_FILE=${LICENSE_HOME}/arm_license/${ARM_DS5_LIEFILE}
export ARMLMD_LICENSE_FILE=37000@cqiuLenovo

####A7 Private Begin
export IK_SIMULATOR=VCS
export IK_PLATFORM_64=TRUE
export IK_MODEL_SRC=RTL
export IK_OS=Linux
export DSM_PATH=path_to_DSM
export DSM_CORTEXA7_VERSION=CORTEXA7_unlicensed_r0p5-00rel0
export MG_LIB=${A7_HOME}/logical/cortexa7_intkit/verilog/armBST/ModelManager/Linux_64/MM
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MG_LIB}/synopsys_vcs_verilog
export CS_TOOLS_HOME=${A7_TOOL}
#setenv DSM_DIR synopsys_vcs_verilog_Linux-64
####A7 Private End 

#${LICENSE_HOME}/xilinx_license/${VIVADO_LICFILE}
#IP_VERSION_Begin
export SPI_VERSION=spi_jc5_1st_20200222
export HQSPI_VERSION=hqspi_jc5_1st_20200222
export CRU_VERSION=cru_jc5_1st_20200222
echo "${SPI_VERSION}"
echo "${HQSPI_VERSION}"
echo "${CRU_VERSION}"
#IP_VERSION_End
#### Alias  
alias lvcs="${SCL_HOME}/amd64/bin/lmgrd -c ${LICENSE_HOME}/novas_license/${VCS_LICFILE} -l ${LICENSE_HOME}/novas_license/synopsys_vcs.log"
echo "The 1st time you should run some commands after reboot the compute"
echo "runcfg"
echo "savecfg"
echo "sudo gvim /etc/hosts [if github slow or not connected]"
alias g="gvim"
#alias verdi3_201403_lmgrd="${SCL_HOME}/linux/bin/lmgrd -c ${LICENSE_HOME}/novas_license/${VERDI_LICFILE} -l ${LICENSE_HOME}/novas_license/synopsys.log"
#### Others
export XILINX_VIVADO=${VIVADO_HOME}/
export SWT_GTK3=0
#### sogou shuru 
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
#### Abandonment 
#alias verdi3_201210_lmgrd='/opt/tool/novas/verdi3_201210/bin/lmgrd -C /home/logic/source_tool/all_license_file_11/novas_license/verdi3_benz_license.dat'
export LD_LIBRARY_PATH=${VERDI_HOME}/share/PLI/MODELSIM/LINUX64:${LD_LIBRARY_PATH}
##export LD_LIBRARY_PATH=/usr/local/microsemi/Libero_v11.7/Libero/bin:${LD_LIBRARY_PATH}
## ==== Licenses and PATH register End 
################################################################

# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="awesomepanda"
##ZSH_THEME="simple"

# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"

# Uncomment the following line to use hyphen-insensitive completion. Case
# sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"

# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"

# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13

# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"

# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"

# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"

# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"

# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"

# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# HIST_STAMPS="mm/dd/yyyy"

# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder

# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)

source $ZSH/oh-my-zsh.sh

# User configuration

# export MANPATH="/usr/local/man:$MANPATH"

# You may need to manually set your language environment
# export LANG=en_US.UTF-8

# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
#   export EDITOR='vim'
# else
#   export EDITOR='mvim'
# fi

# Compilation flags
# export ARCHFLAGS="-arch x86_64"

# ssh
# export SSH_KEY_PATH="~/.ssh/rsa_id"

# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
alias zshconfig="mate ~/.zshrc"
alias ohmyzsh="mate ~/.oh-my-zsh"
#/usr/share/autojump/autojump.sh
[[ -s /home/cqiu/.autojump/etc/profile.d/autojump.sh ]] && source /home/cqiu/.autojump/etc/profile.d/autojump.sh
##autoload -U compinit && compinit -u
alias js="autojump --stat"
alias jp="autojump --purge" 
alias dve="dve -full64"
#source /opt/ros/kinetic/setup.bash
#source /opt/ros/kinetic/setup.zsh
#source  catkin_ws/devel/setup.zsh
#export CM=/home/cqiu/qt_workspace/qt-caffe/qt-caffe-ristretto-cm/cnnData/Layer

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
    alias ls='ls --color=auto'
    #alias dir='dir --color=auto'
    #alias vdir='vdir --color=auto'

    alias grep='grep --color=auto'
    alias fgrep='fgrep --color=auto'
    alias egrep='egrep --color=auto'
fi
